//
// Created by liushuai on 2021/2/14.
//

#include "findTheDifference.h"
char findTheDifference(string s, string t){
    int freq[26]{};
    for(auto e:t){
        freq[e-'a']+=1;
    }
    for(auto e:s){
        freq[e-'a']-=1;
    }
    char res = t[0];
    for(int i=0;i<26;i++){
        if(freq[i] == 1)
            res = i+'a';
    }
    return res;
}